<?php

include_once('logic/action/Action.php');

class DisplayAction extends Action
{
	public function perform()
	{	
		$photos = new PhotosDAO();

		$id = HttpRequest::getRequest("id");

		$data = $photos->getData($id);

		if (is_array($data))
		{
			header("Content-length: $data[0]");
			header("Content-type: $data[1]");
			// header("Content-Disposition: attachment; filename=$name");

			echo $data[2];
		}
	}
}

?>
